<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateManagerTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('manager', function (Blueprint $table) {
            $table->increments('id');  //主键
            $table->string('name',20)->notNULL();
            $table->string('username',20)->notNULL(); //用户名
            $table->string('password')->notNULL(); //密码
            $table->enum('gender',[1,2,3])->notNULL()->default('1'); //性别 1男 2女 3保密
            $table->string('mobile',11); //手机
            $table->string('email',50); //邮箱
            $table->tinyInteger('role_id'); //角色
            $table->timestamps(); //时间
            $table->rememberToken(); //记住登录
            $table->enum('status',[1,2])->notNULL()->default('2'); //账号状态
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('manager');
    }
}
